package cn.smile.bean.entity.basic;

import cn.smile.commons.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("voucher")
public class Voucher extends BaseDomain {
    @Serial
    private static final long serialVersionUID = 6825863013667530732L;

    /**
     * 店铺ID
     */
    private String shopId;

    /**
     * 代金券名称
     */
    private String voucherName;

    /**
     * 代金券金额
     */
    private BigDecimal voucherAmount;

    /**
     * 有效期-开始
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate validityStart;

    /**
     * 有效期-结束
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate validityEnd;

    /**
     * 代金券状态(0-未生效, 1-生效中, 2-已过期)
     * @see cn.smile.commons.enums.basic.VoucherStatusEnum
     */
    private Integer voucherStatus;

    /**
     * 备注
     */
    private String remark;
}
